package cc.mrbird;

import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author: chenhs
 * @date: Created in 16:27 2020/3/21
 **/
public class DemoApplication {

    public static void main(String[] args) {

        SpringApplication application = new SpringApplication(ApplicationResource.class);
//        application.setBannerMode(Banner.Mode.OFF);
//        application.setWebApplicationType(WebApplicationType.NONE);
        application.setAdditionalProfiles("dev");
        application.run(args);

/*
        ConfigurableApplicationContext context = new SpringApplicationBuilder(DemoApplication.class)
                .bannerMode(Banner.Mode.OFF)
                .web(WebApplicationType.NONE)
                .profiles("dev")
                .run(args);
        context.close();*/
}

    @SpringBootApplication
    public static class ApplicationResource {

    }
}
